
module "dev-ops-salt" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  remark = "基础设施管理（车端系统）域名dev环境"
  rr    = "dev-ops-salt"
  type  = "A"
  value = "10.9.9.220"
}

module "dev-traefik-harbor" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-traefik-harbor"
  type  = "A"
  value = "10.9.9.216"
}

module "dev-uat-traefik-lb" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-uat-traefik-lb"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.61"
}

module "dev-traefik-large-lb" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-traefik-large-lb"
  type  = "A"
  ttl   = 60
  value = "10.9.9.118"
}

module "dev-uat-traefik-large-lb" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-uat-traefik-large-lb"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.118"
}

module "dev-webvis" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  remark = "开发测试环境"
  rr    = "dev-webvis"
  type  = "CNAME"
  ttl   = 60
  value = "dev-uat-traefik-lb.deeproute.cn"
}

module "cnames-to-dev-uat-traefik-lb" {
  source = "../../modules/hybrid/dns_multi/deeproute.cn"

  type  = "CNAME"
  value = "dev-uat-traefik-lb.deeproute.cn"
  ttl   = 3600

  rrs = [
    "dev-alertmanager",
    "dev-apm-server",
    "dev-car-grafana",
    "dev-consul",
    "dev-dataocean-account-management-service",
    "dev-dataocean-authentication-service",
    "dev-dataocean-data-provider-service",
    "dev-dataocean-vehicle-data-service",
    "dev-doraemon",
    "dev-gitlab-permission-watchdoge",
    "dev-iac-api",
    "dev-jaeger",
    "dev-kafka-ui",
    "dev-keelsh",
    "dev-logstash-nginx",
    "dev-minio",
    "dev-ml-platform-annotation",
    "dev-ml-platform-explorer",
    "dev-ml-platform-milkyway-pioneer",
    "dev-ml-platform-milkyway-scheduler",
    "dev-ml-platform-trino-server-coordinator",
    "dev-ml-platform-wormhole",
    "dev-mlp-api-etl",
    "dev-mlp-api-gateway",
    "dev-mlp-api-mlpfields",
    "dev-mlp-northstar",
    "dev-mlp-northstar-backend",
    "dev-mlp-northstar-jupyter",
    "dev-mlp-northstar-proxy",
    "dev-monitor-backend",
    "dev-mysql-or",
    "dev-nacos",
    "dev-ops-heketi",
    "dev-ops-nacos",
    "dev-prometheus",
    "dev-prometheusalert",
    "dev-sdcenter-ddspy",
    "dev-sdcenter-dispatch-api",
    "dev-sentry-tools-service",
    "dev-simulation-admin",
    "dev-superset",
    "dev-tmp-task-management",
    "dev-traefik",
    "dev-trivy",
    "dev-victoria-metrics",
    "dev-zipkin",
    "uat-ml-platform-annotation",
    "uat-ml-platform-explorer",
    "uat-ops-heketi",
    "uat-test-ops-heketi",
  ]
}

module "dev-ops-heketi-test" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-ops-heketi-test"
  type  = "CNAME"
  ttl   = 3600
  value = "dev-ops-heketi.deeproute.cn"
}

module "cnames-to-dev-uat-traefik-large-lb" {
  source = "../../modules/hybrid/dns_multi/deeproute.cn"

  type  = "CNAME"
  value = "dev-uat-traefik-large-lb.deeproute.cn"
  ttl   = 3600

  rrs = [
    "data.internal-dev",
    "dev-data-collection",
    "dev-dataocean",
    "dev-drfile",
    "dev-drplatform",
    "dev-external-dataocean-data-provider-service",
    "dev-external-grpc-dataocean-data-provider-service",
    "dev-kube-auth-manager",
    "dev-kube-auth-manager-web",
    "dev-map-pipeline",
    "dev-simulation",
    "dev-task-management",
    "dev-vault",
    "dev-vehicle-management",
  ]
}

module "dev-elasticsearch" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  remark = "edge回传日志到测试环境"
  rr    = "dev-elasticsearch"
  type  = "CNAME"
  value = "dev-uat-traefik-large-lb.deeproute.cn"
}

module "cnames-to-dev-traefik-large-lb" {
  source = "../../modules/hybrid/dns_multi/deeproute.cn"

  type  = "CNAME"
  value = "dev-traefik-large-lb.deeproute.cn"
  ttl   = 3600

  rrs = [
    "dev-dataocean-api-gateway",
    "dev-dns-demo.srv",
    "dev-dr-diagnostic-tool",
    "dev-drtraining-api-gateway",
    "dev-drtraining-platform",
    "dev-keycloak",
    "dev-state-collector",
  ]
}

# dev-keycloak-vpn.deeproute.cn is already resolvable on aliyun cloudbox, but dunno why?
resource "deeproute_dns_record" "dev-keycloak-vpn" {
  zone  = local.dr_cn_zone_name
  rr    = "dev-keycloak-vpn"
  type  = "A"
  ttl   = 3600
  value = "183.61.62.44"
}

module "dev-airflow" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-airflow"
  type  = "A"
  ttl   = 3600
  value = "10.10.10.15"
}

module "dev-grafana" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-grafana"
  type  = "A"
  ttl   = 3600
  value = "10.1.1.1"
}

module "dev-kafka" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-kafka"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.109"
}

module "dev-kubeedge-scheduler" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-kubeedge-scheduler"
  type  = "A"
  ttl   = 3600
  value = "10.250.77.124"
}

module "dev-kubeflow" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-kubeflow"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.209"
}

module "dev-minio-cs" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-minio-cs"
  type  = "A"
  ttl   = 3600
  value = "10.10.10.15"
}

module "dev-mlp-dolphinscheduler" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-mlp-dolphinscheduler"
  type  = "A"
  ttl   = 3600
  value = "10.3.1.17"
}

module "dev-planing-mongo" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-planing-mongo"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.113"
}

module "dev-planing-mysql" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-planing-mysql"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.200"
}

module "dev-pushgateway" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-pushgateway"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.61"
}

module "dev-rabbitmq" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-rabbitmq"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.112"
}

module "dev-receiver-internal-mesh" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-receiver-internal.mesh"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.219"
}

module "dev-simulation-platform" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-simulation-platform"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.201"
}

module "dev-traefik-lb" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-traefik-lb"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.61"
}

module "dev-uat-traefik-lb-tcp" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-uat-traefik-lb-tcp"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.102"
}

module "test-xhu-tf-gitops" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "test-xhu-tf-gitops"
  type  = "A"
  ttl   = 3600
  value = "10.9.9.102"
}

module "dev-hrm" {
  source = "../../modules/hybrid/dns/deeproute.cn"

  rr    = "dev-hrm"
  type  = "A"
  value = "183.61.62.44"
}
